package com.xyq.api.domain;

import com.xyq.api.domain.dto.JudgeSubmitDTO;
import com.xyq.api.domain.vo.UserQuestionResultVO;
import com.xyq.common.core.constants.Constants;
import com.xyq.common.core.constants.HttpConstants;
import com.xyq.common.core.domain.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;


// 配置服务路径, 后续可以根据 nacos上的配置找到路径
@FeignClient(contextId = "RemoteJudgeService" , value = Constants.JUDGE_SERVICE)
public interface RemoteJudgeService {
    // 请求Judge判题方法            java代码
    @PostMapping("/judge/doJudgeJavaCode")
    Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO,
                                                 @RequestHeader(HttpConstants.AUTHENTICATION) String token) ;
}
